import request from '@/utils/request'

// 查询信用分变更记录列表
export function listCreditHistory(query) {
  return request({
    url: '/user/creditHistory/list',
    method: 'get',
    params: query
  })
}

// 查询信用分变更记录详细
export function getCreditHistory(historyId) {
  return request({
    url: '/user/creditHistory/' + historyId,
    method: 'get'
  })
}

// 新增信用分变更记录
export function addCreditHistory(data) {
  return request({
    url: '/user/creditHistory',
    method: 'post',
    data: data
  })
}

// 修改信用分变更记录
export function updateCreditHistory(data) {
  return request({
    url: '/user/creditHistory',
    method: 'put',
    data: data
  })
}

// 删除信用分变更记录
export function delCreditHistory(historyId) {
  return request({
    url: '/user/creditHistory/' + historyId,
    method: 'delete'
  })
}
